package 竞赛.NO_394;

/**
 * 100294. 统计特殊字母的数量 I
 * 创建时间：2024-04-21 11:00
 */
public class 统计特殊字母的数量I_100294 {
    static class Solution {
        public int numberOfSpecialChars(String word) {
            int ans = 0;
            boolean[] s = new boolean['z'];
            for (char c : word.toCharArray()) {
                s[c] = true;
            }
            for (int i = 'a'; i <= 'z'; i++) {
                if(s[i] && s[i - 'a' + 'A'])
                    ans++;
            }
        return ans;
        }

        public static void main(String[] args) {
            Solution s = new Solution();
            System.out.println(s.numberOfSpecialChars("AbBCab"));
        }
    }
}
